<!-- pass a variable to included page -->
<%@ page import="instructor.sample.*" %>
<%@ page import="java.text.*" %>
<%@ page import="java.util.*" %>
<%@ page import="java.sql.*" %>
<% 

   request.setAttribute("picture","Dispatcher");
   request.setAttribute("title", "Replacement Parts Shipment Calculator"); 
   request.setAttribute("header", "Welcome"); 

  	String quantity=request.getParameter("Quantity");        
  	String weight=request.getParameter("Weight");      		
	String rate=request.getParameter("Rate");    					
    String charge=request.getParameter("Charge");    
    
     %>
    
  <%@ include file="header.jsp"%> 
    <TD width="820" vAlign="top">
    <h3>Calculated Shipment Cost: </h3><p>   
<%  
    ShipCalculator sc=new ShipCalculator();
    sc.setCharge(Float.parseFloat(charge));
    sc.setItemweight(Integer.parseInt(weight));
    sc.setQuantity(Integer.parseInt(quantity));
    sc.setRate(Float.parseFloat(rate));
    String htmlstring = sc.getOutput();
%>	
<%=htmlstring%>
<br/><br/><br/>
<input type=button name=backButton id=backButton value="Back" onclick="history.back();">
</p></TD></TR></TABLE></BODY></HTML>
